<!-- 分类列表 -->
<extend name="Public:layout" />
<block name="title"><{$authName}></block>

<block name="pluginCSS">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/jquery-nestable/jquery.nestable.css"/>
</block>
<block name="CSS"></block>

<block name="loadJS">
<script src="__PUBLIC__/admin/scripts/layer/layer.js" type="text/javascript"></script>	
<script src="__PUBLIC__/admin/plugins/jquery-nestable/jquery.nestable.js"></script>

</block>
<block name="setJS">

<script src="__PUBLIC__/Admin/scripts/custom/nestableGoodsCats.js"></script>
<script>
var ajaxUrl="<{:U('index')}>";
</script>
</block>
<block name="initJS">
NestableGoodsCats.init();
</block>

<block name="pagetitle">增删改查</block>
<block name="page">
<div class="row">
	<div class="col-md-12">
		<div class="portlet">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa <{$authIco}>"></i><{$authName}>
				</div>				
				<div class="actions" id="nestable_list_menu">
					<a class="btn default green-stripe" id="table_common_new" data-toggle="modal" href="#">
						<i class="fa fa-plus"></i>
						<span class="hidden-480">添加分类</span>
					</a>
					<button type="button" class="btn" data-action="expand-all">展开</button>
					<button type="button" class="btn" data-action="collapse-all">收缩</button>
				</div>				
			</div>
			<div class="portlet-body">
				<div class="dd" id="nestable"></div>
				<textarea id="nestable_output" style="display:none" class="form-control col-md-12 margin-bottom-10"></textarea>				
			</div>
			</div>
		</div>
	</div>
</div>
							
<div id="responsive" class="modal fade bs-modal-lg" tabindex="-1" aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<form class="form-horizontal" action="<{:U('index')}>" method="post">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
				<h4 class="modal-title"></h4>
			</div>
			<div class="modal-body">
				<div class="scroller" style="height:200px" data-always-visible="1" data-rail-visible1="1">
					<div class="row">
							<input type="hidden" name="ajax" value="">
							<input type="hidden" name="catId" value="">
							<div class="form-body">
								<div class="form-group">
									<label class="col-md-3 control-label" for="parentId">上级分类</label>		
									<div class="col-md-7">
										<select class="form-control" name="parentId">
												<option value="0">顶级分类</option>
												<foreach name="parentNames" item="val" key="key">
												<option value="<{$val['catId']}>">
													<php>
														echo str_repeat('&nbsp;&nbsp;',substr_count($val['catPath'],',')*5 );
													</php>
												├─ <{$val['catName']}>
												</option>
												</foreach>
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-3 control-label" for="catName">分类名称</label>
									<div class="col-md-7">
										<input type="text" class="form-control" placeholder="分类名称" name="catName" id="catName" />
									</div>
								</div>								
								<div class="form-group">
									<label class="col-md-3 control-label" for="priceSection">价格区间</label>
									<div class="col-md-7">
										<input type="text" class="form-control" placeholder="价格区间" name="priceSection" id="priceSection" />
									</div>
								</div>								
							</div>						
					</div>
				</div>
			</div>
			<div class="modal-footer">				
				<button type="button" data-dismiss="modal" class="btn default">取消</button>
				<button type="submit" class="btn green">保存</button>
			</div>
		</div>
		</form>
	</div>
	
</div>
</block>